Guard Simplification in CHR programs

نویسندگان

  • Jon Sneyers
  • Tom Schrijvers
  • Bart Demoen
چکیده

Constraint Handling Rules (CHR) is a high-level language commonly used to write constraint solvers. Most CHR programs depend on the refined operational semantics, resulting in an obfuscated logical reading and non-termination or worse under the theoretical operational semantics. We introduce a source to source transformation called guard simplification which allows CHR programmers to write self-documented rules with a clear logical reading. It improves performance by removing guards entailed by the implicit “no earlier (sub)rule fired” precondition and optional type and mode declarations. A correctness proof of the transformation is given, its implementation in the K.U.Leuven CHR compiler is presented and experimental results are discussed.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Guard Reasoning for CHR Optimization

Constraint Handling Rules (CHR) is a high-level language commonly used to write constraint solvers. Most CHR programs depend on the refined operational semantics, resulting in an obfuscated logical reading and potential misbehavior under the theoretical operational semantics. We introduce two source to source transformations: guard simplification and occurrence subsumption. By removing redundan...

متن کامل

The CHR-based Implementation of a System for Generation and Confirmation of Hypotheses

Talks/Presentations/GLP Meeting/Coffee/Registration are in room O28/1002. 19th Workshop on (Constraint) Logic Programming, University Ulm, Germany, February 21 23, 2005. Dietmar Seipel and Klaus Praetor: XML Transformations based on Logic Programming M.Alberti, F.Chesani, M.Gavanelli, E.Lamma, P.Mello, P.Torroni: The CHR-based Implementation of a System for Generation and Confirmation of Hypoth...

متن کامل

Guard and Continuation Optimization for Occurrence Representations of CHR

Constraint Handling Rules (CHR) is a high-level rule-based language extension, commonly embedded in Prolog. We introduce a new occurrence representation of CHR programs, and a new operational semantics for occurrence representations, equivalent to the widely implemented refined operational semantics. The occurrence representation allows in a natural way to express guard and continuation optimiz...

متن کامل

Automating Termination Proofs for CHR

We propose a constraint-based approach towards automated termination analysis of Constraint Handling Rules (CHR). Similar to such approaches for Logic Programming (LP), we define a symbolic level mapping on atoms of the program and express termination conditions using these. Then, we search for an assignment to the symbolic coefficients, validating the termination conditions. However, different...

متن کامل

Transforming Coroutining Logic Programs into Equivalent CHR Programs

We extend a technique called Compiling Control. The technique transforms coroutining logic programs into logic programs that, when executed under the standard left-to-right selection rule (and not using any delay features) have the same computational behavior as the coroutining program. In recent work, we revised Compiling Control and reformulated it as an instance of Abstract Conjunctive Parti...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005